/*---------------------------------------------------------------------
 * File name: font.h
 *
 * Copyright (c) <2020-2022>, <ChenLong>
 *
 * All rights reserved.
 *
 * Author: ChenLong
 * Email: worldlong@foxmail.com
 *--------------------------------------------------------------------*/
#pragma once
/*
*/
template<typename Type>
class Font
{
public:
  Font(const char* _name, const Type* data, int size) :
    name(_name),
    _data(data),
    _size(size)
  {}
  
  const char *name;
  
  Type* get_data(int index)
  {
    return (Type*)&_data[index*_size];
  }
private:
  const Type *_data;
  int _size;
};
/*
*/
extern Font<uint8_t> font_consolas_ascii_8x16;
extern Font<uint8_t> font_consolas_ascii_12x24;



